using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WaterQualityReportSystem
{
    public partial class LogForm : Form
    {

        private static LogForm instance = null;

        public static LogForm getInstance() {
            if (instance == null) {
                instance = new LogForm();
            }

            return instance;
        }
        private LogForm()
        {
            InitializeComponent();
        }

        private void btClear_Click(object sender, EventArgs e)
        {
            txtLog.Text = "";
        }

        public void showLog(String logContent) {
            String dateTime = DateTime.Now.ToString();

            instance.txtLog.Text = dateTime + " " + logContent + "\r\n";
        }
    }
}
